package com.zheng.business.rpc.service.impl;

import com.zheng.business.dao.use.model.StatisticsModel;
import com.zheng.business.rpc.api.BusinessApiService;
import com.zheng.business.rpc.mapper.BusinessApiMapper;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lvg EMIAL：<a href="mailto:weiguo.liang@gh-ca.com">weiguo.liang@gh-ca.com</a> <br>
 * @version 1.0 <br>
 * @Company: GH-CA<br>
 * @ClassName: BusinessApiServiceImpl <br>
 * @Description: TODO <br>
 * @date 2019/3/17 12:53<br>
 **/
public class BusinessApiServiceImpl implements BusinessApiService {

    @Autowired
    private BusinessApiMapper mapper;


    @Override
    public List<Map<String,Object>> getAgentOrderAmountByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getAgentOrderAmountByTimeSlot(beginTime,endTime);
    }

    @Override
    public List<Map<String,Object>> getMachineOrderAmountByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getMachineOrderAmountByTimeSlot(beginTime,endTime);
    }

    @Override
    public List<Map<String,Object>> getAgentTimecardAmountByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getAgentTimecardAmountByTimeSlot(beginTime,endTime);
    }

    @Override
    public List<Map<String, Object>> getAgentOrderSuccessTotalByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getAgentOrderSuccessTotalByTimeSlot(beginTime,endTime);
    }

    @Override
    public List<Map<String, Object>> getMachineOrderSuccessTotalByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getMachineOrderSuccessTotalByTimeSlot(beginTime, endTime);
    }

    @Override
    public List<Map<String, Object>> getAgentOrderFailTotalByTimeSlot(Date beginTime, Date endTime) {
        return mapper.getAgentOrderFailTotalByTimeSlot(beginTime, endTime);
    }

    @Override
    public List<Map<String, Object>> getMachineOrderFailTotalByTimeSlot(Date beginTime, Date endTime) {
        return getMachineOrderFailTotalByTimeSlot(beginTime, endTime);
    }

    @Override
    public List<Map<String, Object>> getBillStatisticsList(List<Integer> agentIdList) {
        return mapper.getBillStatisticsList(agentIdList);
    }

    @Override
    public int copyUmbrellaOrder2HistroyByTimeSlot(Date beginTime, Date endTime, String createMonth) {
        return mapper.copyUmbrellaOrder2HistroyByTimeSlot(beginTime, endTime, createMonth);
    }

    @Override
    public int copyTimecard2HistroyByTimeSlot(Date beginTime, Date endTime, String createMonth) {
        return mapper.copyTimecard2HistroyByTimeSlot(beginTime, endTime, createMonth);
    }

    @Override
    public List<Map<String, Object>> getAgentUmbrellaOrderBillAmountByTime(String createMonth) {
        return mapper.getAgentUmbrellaOrderBillAmountByTime(createMonth);
    }

    @Override
    public List<Map<String, Object>> getAgentTimecardOrderBillAmountByTime(String createMonth) {
        return mapper.getAgentTimecardOrderBillAmountByTime(createMonth);
    }

    @Override
    public List<StatisticsModel> getOrderTrendByAgentId(StatisticsModel model) {
        return mapper.getOrderTrendByAgentId(model);
    }

    @Override
    public Double getProfitByAgentId(StatisticsModel model) {
        return mapper.getProfitByAgentId(model);
    }

    @Override
    public Long getOrderCountByAgentId(StatisticsModel model) {
        return mapper.getOrderCountByAgentId(model);
    }

    @Override
    public Long getFansByAgentId(StatisticsModel model) {
        return mapper.getFansByAgentId(model);
    }

    @Override
    public Double getDepositByAgentId(StatisticsModel model) {
        return mapper.getDepositByAgentId(model);
    }

    @Override
    public Double getTimecardByAgentId(StatisticsModel model) {
        return mapper.getTimecardByAgentId(model);
    }

    @Override
    public Double getBalanceByAgentId(StatisticsModel model) {
        return mapper.getBalanceByAgentId(model);
    }

    @Override
    public List<StatisticsModel> getUmbrellaStatisticsByAgentId(StatisticsModel model) {
        return mapper.getUmbrellaStatisticsByAgentId(model);
    }

    @Override
    public List<StatisticsModel> getMachineStatisticsByAgentId(StatisticsModel model) {
        return mapper.getMachineStatisticsByAgentId(model);
    }
}
